package com.gosophia.dataDictionary.action;

import java.util.List;

import org.apache.struts2.json.annotations.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.OrderCondition;
import com.gosophia.commons.Page;
import com.gosophia.commons.PropertyFilter;
import com.gosophia.commons.exception.BusinessException;
import com.gosophia.commons.exception.CommonException;
import com.gosophia.commons.web.action.BaseAjaxAction;
import com.gosophia.commons.web.bean.RequestResult;
import com.gosophia.dataDictionary.dto.DataValueDTO;
import com.gosophia.dataDictionary.ws.DataDictionaryWebService;

/**
 * 显示数据值的详细信息
 * 
 * @author tianchunyu
 * 
 */
@Controller
@Scope("prototype")
public class DataValueDetailAction extends BaseAjaxAction<DataValueDTO> {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    @Override
    public DataValueDTO getDetailData() {
        if (this.detailData == null) {
            this.detailData = new DataValueDTO();
        }
        return this.detailData;
    }

    @Autowired
    private DataDictionaryWebService dataDictionaryWebService;

    @Override
    public String _execute() throws Exception {
        
        this.detailData = dataDictionaryWebService
                .findDataValueByDataValueId(this.detailData.getDataValueId());
        
        getRequestResult().setRsltCode("0");
        return SUCCESS;
    }

}
